.class public Lcom/instagram/android/c2dm/k;
.super Ljava/lang/Object;
.source "PushNotificationManager.java"


# static fields
.field private static final a:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class",
            "<*>;"
        }
    .end annotation
.end field

.field private static b:Lcom/instagram/android/c2dm/k;


# instance fields
.field private c:Lcom/instagram/k/b;

.field private d:Landroid/support/v4/a/e;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 44
    const-class v0, Lcom/instagram/android/c2dm/k;

    sput-object v0, Lcom/instagram/android/c2dm/k;->a:Ljava/lang/Class;

    return-void
.end method

.method private constructor <init>(Landroid/content/Context;Landroid/support/v4/a/e;)V
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 61
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 62
    iput-object p2, p0, Lcom/instagram/android/c2dm/k;->d:Landroid/support/v4/a/e;

    .line 64
    invoke-static {}, Lcom/instagram/k/b;->a()Lcom/instagram/k/b;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/c2dm/k;->c:Lcom/instagram/k/b;

    .line 66
    iget-object v0, p0, Lcom/instagram/android/c2dm/k;->c:Lcom/instagram/k/b;

    const-string v1, "directshare"

    new-instance v2, Lcom/instagram/android/c2dm/a/a;

    invoke-direct {v2, p1}, Lcom/instagram/android/c2dm/a/a;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, v1, v2}, Lcom/instagram/k/b;->a(Ljava/lang/String;Lcom/instagram/k/g;)V

    .line 71
    iget-object v0, p0, Lcom/instagram/android/c2dm/k;->c:Lcom/instagram/k/b;

    const-string v1, "directshare_request"

    new-instance v2, Lcom/instagram/android/c2dm/a/d;

    invoke-direct {v2, p1}, Lcom/instagram/android/c2dm/a/d;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, v1, v2}, Lcom/instagram/k/b;->a(Ljava/lang/String;Lcom/instagram/k/g;)V

    .line 76
    iget-object v0, p0, Lcom/instagram/android/c2dm/k;->c:Lcom/instagram/k/b;

    const-string v1, "newstab"

    new-instance v2, Lcom/instagram/android/c2dm/a/b;

    invoke-direct {v2, p1}, Lcom/instagram/android/c2dm/a/b;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, v1, v2}, Lcom/instagram/k/b;->a(Ljava/lang/String;Lcom/instagram/k/g;)V

    .line 80
    return-void
.end method

.method public static a()Lcom/instagram/android/c2dm/k;
    .locals 3

    .prologue
    .line 53
    sget-object v0, Lcom/instagram/android/c2dm/k;->b:Lcom/instagram/android/c2dm/k;

    if-nez v0, :cond_0

    .line 54
    new-instance v0, Lcom/instagram/android/c2dm/k;

    invoke-static {}, Lcom/instagram/e/a/a;->a()Landroid/content/Context;

    move-result-object v1

    invoke-static {}, Lcom/instagram/e/a/a;->a()Landroid/content/Context;

    move-result-object v2

    invoke-static {v2}, Landroid/support/v4/a/e;->a(Landroid/content/Context;)Landroid/support/v4/a/e;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Lcom/instagram/android/c2dm/k;-><init>(Landroid/content/Context;Landroid/support/v4/a/e;)V

    sput-object v0, Lcom/instagram/android/c2dm/k;->b:Lcom/instagram/android/c2dm/k;

    .line 58
    :cond_0
    sget-object v0, Lcom/instagram/android/c2dm/k;->b:Lcom/instagram/android/c2dm/k;

    return-object v0
.end method

.method private a(Ljava/lang/String;Ljava/lang/String;Lcom/instagram/android/c2dm/d;)V
    .locals 3
    .parameter
    .parameter
    .parameter

    .prologue
    .line 184
    invoke-static {p1, p2}, Lcom/instagram/android/c2dm/g;->a(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    .line 185
    new-instance v1, Landroid/content/Intent;

    const-string v2, "com.instagram.android.receiver.C2DMReceiver.NOTIFICATION_RECEIVED_BROADCAST"

    invoke-direct {v1, v2, v0}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 187
    iget-object v0, p0, Lcom/instagram/android/c2dm/k;->d:Landroid/support/v4/a/e;

    invoke-virtual {v0, v1}, Landroid/support/v4/a/e;->a(Landroid/content/Intent;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 189
    sget-object v0, Lcom/instagram/android/c2dm/k;->a:Ljava/lang/Class;

    const-string v1, "broadcast sent and received"

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->a(Ljava/lang/Class;Ljava/lang/String;)V

    .line 194
    :goto_0
    return-void

    .line 191
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/c2dm/k;->c:Lcom/instagram/k/b;

    invoke-virtual {v0, p1, p2, p3}, Lcom/instagram/k/b;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)V

    goto :goto_0
.end method

.method public static b(Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .parameter

    .prologue
    .line 162
    const-string v0, "direct?id=%s"

    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    aput-object p0, v1, v2

    invoke-static {v0, v1}, Lcom/facebook/c/i/b;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method


# virtual methods
.method public a(Landroid/content/Context;Landroid/content/Intent;Landroid/os/Handler;)V
    .locals 5
    .parameter
    .parameter
    .parameter

    .prologue
    const/4 v1, 0x0

    .line 83
    invoke-static {}, Lcom/instagram/android/service/f;->a()Lcom/instagram/android/service/f;

    move-result-object v0

    .line 84
    invoke-static {v0, p2}, Lcom/instagram/android/c2dm/f;->a(Lcom/instagram/android/service/f;Landroid/content/Intent;)Lcom/instagram/android/c2dm/d;

    move-result-object v0

    .line 86
    new-instance v2, Lcom/instagram/b/b;

    const-string v3, "push_notification_received"

    invoke-direct {v2, v3, v1}, Lcom/instagram/b/b;-><init>(Ljava/lang/String;Lcom/instagram/b/d;)V

    .line 87
    invoke-virtual {v0}, Lcom/instagram/android/c2dm/d;->n()Ljava/lang/String;

    move-result-object v3

    .line 88
    if-eqz v3, :cond_0

    .line 89
    const-string v4, "pi"

    invoke-virtual {v2, v4, v3}, Lcom/instagram/b/b;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/instagram/b/b;

    .line 92
    :cond_0
    invoke-static {}, Lcom/instagram/service/a;->a()Lcom/instagram/service/a;

    move-result-object v3

    invoke-virtual {v3}, Lcom/instagram/service/a;->b()Lcom/instagram/android/model/b/e;

    move-result-object v3

    .line 93
    if-eqz v3, :cond_1

    if-eqz v0, :cond_2

    invoke-virtual {v3}, Lcom/instagram/android/model/b/e;->k()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0}, Lcom/instagram/android/c2dm/d;->h()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-nez v3, :cond_2

    .line 96
    :cond_1
    const-string v0, "mismatch"

    const/4 v3, 0x1

    invoke-virtual {v2, v0, v3}, Lcom/instagram/b/b;->a(Ljava/lang/String;Z)Lcom/instagram/b/b;

    move-object v0, v1

    .line 102
    :cond_2
    invoke-static {}, Lcom/instagram/b/a;->a()Lcom/instagram/b/c;

    move-result-object v1

    invoke-interface {v1, v2}, Lcom/instagram/b/c;->a(Lcom/instagram/b/b;)V

    .line 104
    if-eqz v0, :cond_3

    .line 105
    invoke-static {v0}, Lcom/instagram/android/c2dm/h;->a(Lcom/instagram/android/c2dm/d;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 106
    invoke-static {p1, v0, p3}, Lcom/instagram/android/c2dm/h;->a(Landroid/content/Context;Lcom/instagram/android/c2dm/d;Landroid/os/Handler;)V

    .line 111
    :cond_3
    :goto_0
    return-void

    .line 108
    :cond_4
    invoke-virtual {p0, v0}, Lcom/instagram/android/c2dm/k;->a(Lcom/instagram/android/c2dm/d;)V

    goto :goto_0
.end method

.method public a(Landroid/content/Intent;)V
    .locals 6
    .parameter

    .prologue
    const/4 v5, 0x2

    const/4 v2, 0x0

    const/4 v1, 0x1

    .line 117
    invoke-virtual {p1}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v0

    .line 119
    const-string v3, "ig"

    invoke-virtual {v0}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    invoke-static {v3}, Lcom/b/a/a/ah;->a(Z)V

    .line 120
    const-string v3, "notif"

    invoke-virtual {v0}, Landroid/net/Uri;->getAuthority()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    invoke-static {v3}, Lcom/b/a/a/ah;->a(Z)V

    .line 122
    invoke-virtual {v0}, Landroid/net/Uri;->getPathSegments()Ljava/util/List;

    move-result-object v3

    .line 124
    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v0

    if-lt v0, v1, :cond_0

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v0

    if-gt v0, v5, :cond_0

    move v0, v1

    :goto_0
    invoke-static {v0}, Lcom/b/a/a/ah;->a(Z)V

    .line 126
    invoke-interface {v3, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    .line 127
    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v2

    if-ne v2, v5, :cond_1

    .line 128
    iget-object v2, p0, Lcom/instagram/android/c2dm/k;->c:Lcom/instagram/k/b;

    invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    invoke-virtual {v2, v0, v1}, Lcom/instagram/k/b;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 132
    :goto_1
    return-void

    :cond_0
    move v0, v2

    .line 124
    goto :goto_0

    .line 130
    :cond_1
    iget-object v1, p0, Lcom/instagram/android/c2dm/k;->c:Lcom/instagram/k/b;

    invoke-virtual {v1, v0}, Lcom/instagram/k/b;->a(Ljava/lang/String;)V

    goto :goto_1
.end method

.method a(Lcom/instagram/android/c2dm/d;)V
    .locals 2
    .parameter

    .prologue
    .line 135
    invoke-virtual {p1}, Lcom/instagram/android/c2dm/d;->a()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/android/c2dm/c;->a(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 138
    const-string v0, "directshare"

    invoke-virtual {p1}, Lcom/instagram/android/c2dm/d;->e()Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v0, v1, p1}, Lcom/instagram/android/c2dm/k;->a(Ljava/lang/String;Ljava/lang/String;Lcom/instagram/android/c2dm/d;)V

    .line 149
    :goto_0
    invoke-virtual {p1}, Lcom/instagram/android/c2dm/d;->o()V

    .line 150
    return-void

    .line 139
    :cond_0
    invoke-virtual {p1}, Lcom/instagram/android/c2dm/d;->a()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/android/c2dm/c;->b(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 141
    const-string v0, "direct_request"

    invoke-virtual {p1, v0}, Lcom/instagram/android/c2dm/d;->c(Ljava/lang/String;)V

    .line 142
    const-string v0, "directshare_request"

    const-string v1, ""

    invoke-direct {p0, v0, v1, p1}, Lcom/instagram/android/c2dm/k;->a(Ljava/lang/String;Ljava/lang/String;Lcom/instagram/android/c2dm/d;)V

    goto :goto_0

    .line 146
    :cond_1
    const-string v0, "newstab"

    invoke-virtual {p1}, Lcom/instagram/android/c2dm/d;->a()Ljava/lang/String;

    move-result-object v1

    invoke-direct {p0, v0, v1, p1}, Lcom/instagram/android/c2dm/k;->a(Ljava/lang/String;Ljava/lang/String;Lcom/instagram/android/c2dm/d;)V

    goto :goto_0
.end method

.method public a(Ljava/lang/String;)V
    .locals 3
    .parameter

    .prologue
    .line 158
    iget-object v0, p0, Lcom/instagram/android/c2dm/k;->c:Lcom/instagram/k/b;

    const-string v1, "directshare"

    invoke-static {p1}, Lcom/instagram/android/c2dm/k;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/instagram/k/b;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 159
    return-void
.end method

.method public b()V
    .locals 1

    .prologue
    .line 153
    iget-object v0, p0, Lcom/instagram/android/c2dm/k;->c:Lcom/instagram/k/b;

    invoke-virtual {v0}, Lcom/instagram/k/b;->b()V

    .line 154
    const/4 v0, 0x0

    sput-object v0, Lcom/instagram/android/c2dm/k;->b:Lcom/instagram/android/c2dm/k;

    .line 155
    return-void
.end method

.method public c()V
    .locals 2

    .prologue
    .line 166
    iget-object v0, p0, Lcom/instagram/android/c2dm/k;->c:Lcom/instagram/k/b;

    const-string v1, "directshare"

    invoke-virtual {v0, v1}, Lcom/instagram/k/b;->a(Ljava/lang/String;)V

    .line 167
    return-void
.end method

.method public d()V
    .locals 2

    .prologue
    .line 170
    iget-object v0, p0, Lcom/instagram/android/c2dm/k;->c:Lcom/instagram/k/b;

    const-string v1, "directshare_request"

    invoke-virtual {v0, v1}, Lcom/instagram/k/b;->a(Ljava/lang/String;)V

    .line 171
    return-void
.end method

.method public e()V
    .locals 2

    .prologue
    .line 174
    iget-object v0, p0, Lcom/instagram/android/c2dm/k;->c:Lcom/instagram/k/b;

    const-string v1, "newstab"

    invoke-virtual {v0, v1}, Lcom/instagram/k/b;->a(Ljava/lang/String;)V

    .line 175
    return-void
.end method
